﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExportDeclarations.aspx.cs"
    Inherits="WMS6.Web.Customs.ExportDeclarations" meta:resourcekey="PageResource1" %>

<%@ Register Src="../UserControls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>ExportDeclarations</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <link rel="Stylesheet" href="../Js/UpLoad/uploadify.css" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/jquery.blockUI.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>

    <script type="text/javascript" src="../Js/UpLoad/swfobject.js"></script>

    <script type="text/javascript" src="../Js/UpLoad/jquery.uploadify.min.js"></script>

    <script type="text/javascript">
    $(document).ready(function() {
            $("#uploadify").uploadify({             
                'uploader': '../Js/UpLoad/uploadify.swf',
                'script': '../Common/JQUpLoad.aspx?type=ATTACHMENTS',
                'cancelImg': '../Js/UpLoad/cancel.png',
                'folder': 'upload',
                'queueID': 'fileQueue',
                'auto': false,
                'multi': false, //是否支持多文本 
                'onComplete': function(event, queueID, fileObj, response, data) 
                {     
                  document.getElementById('hdnResponse').value=response;
                 __doPostBack("SaveAttach","");                
                }
            });
        });
    
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        function newExportDeclarations()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "ExportDeclarations.aspx?from=" + from;
            return false;
        }
        
        function confirmMsg(code)
        {
            if(code == "C001")
            {
                if(confirm('<%=GetGlobalMsgResource("C001") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }
        
        //弹出窗口选择货主
        function selectOwner()
        {
            var rtnValue = popModalWindow('../Configuration/OwnerQuery.aspx?action=txtOwnerID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtOwnerID").focus();
                document.getElementById("txtOwnerID").value = rtnValue;
            }
        }
        
        //弹出窗口选择出库单
        function selectOrder()
        {
           var ownerID=document.getElementById("txtOwnerID").value;
            var rtnValue = popModalWindow('../Outbound/ShippingOrderQuery.aspx?action=txtOrderID&OrderStatus=Shipped,Closed&DeclarationsType=NCR&OwnerID='+escape(ownerID),'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                rtnValue = rtnValue.split(',');
                document.getElementById("txtOrderID").focus();
                document.getElementById("txtOrderID").value = rtnValue[0];
                if(ownerID =='')
                {
                   document.getElementById("txtOwnerID").value= rtnValue[1];
                }
                __doPostBack("OrderID_TextChanged","");
            }
        }
        
        //验证数量方法
         function  VerifyTheQty(obj)
         {     
            var  oldqty = parseInt(obj.title);
            var  newqty = parseInt(obj.value);
            if(newqty >oldqty)
            {
            
              document.getElementById('lblMsg').innerText='本行项申报数量不等大于'+oldqty;
              obj.value =0;
              obj.focus();
            }
         } 
         function showAction()
		{	
			var pos = getElementPos("btnAction");	
			document.getElementById("actionDiv").style.top = pos.y+17;
			document.getElementById("actionDiv").style.left = pos.x;  			
			document.getElementById("hiddenFlag").value = '1';
		}
		  function hiddenDiv()
		  {
			var flag = document.getElementById("hiddenFlag").value
			if(flag == "1")
			{
				document.getElementById("actionDiv").style.display = "block";
				document.getElementById("hiddenFlag").value = '0';
			}
			else 
			{
				document.getElementById("actionDiv").style.display = "none";
			}
		  }
		  //锁屏
		function blockScreen()
		{
		    //锁屏
		    $.blockUI.defaults.message = GetBlockUIMsg();
            $.blockUI.defaults.overlayCSS.backgroundColor = GetBlockUIBgColor();
            $.blockUI();
		}
		function  fileDownload(fileName,fullPath)
        {
            document.getElementById('hdnfileName').value=fileName;
            document.getElementById('hdnfullPath').value=fullPath;
             __doPostBack("DownloadAttach","");
        }
    </script>

</head>
<body>
    <form id="F79821" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblExportDeclarations" runat="server" CssClass="label_header" Text="出区报关"
                            meta:resourcekey="lblExportDeclarations"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Enabled="False" Text="<%$ Resources:ButtonResource,btnNew %>"
                            AccessKey="n" OnClientClick="newExportDeclarations();return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Enabled="False" Text="<%$ Resources:ButtonResource,btnSave %>"
                            AccessKey="s" OnClick="btnSave_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Enabled="False" Text="<%$ Resources:ButtonResource,btnDelete %>"
                            AccessKey="d" OnClientClick="javascript:if(confirmMsg('C001')) return true; else return false;" OnClick="btnDelete_Click" />
                    </td>
                    <td>
                        <input id="btnAction" type="button" runat="server" value="<%$Resources:ButtonResource,btnAction%>"
                            class="button" onclick="showAction();" />
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Enabled="False" Text="<%$ Resources:ButtonResource,btnGoBack %>"
                            CausesValidation="False" OnClick="btnGoBack_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" meta:resourcekey="lblMsg"></asp:Label>
        </div>
        <div id="div_menu">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="divL1">
                </div>
            </div>
            <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,3)"
                id="divM1">
                <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">基本信息</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="divR1">
                </div>
            </div>
            <div style="float: left; width: 8px;">
                <div class="tabL_1" id="divL2">
                </div>
            </div>
            <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,3);"
                id="divM2">
                <asp:Label ID="one2" CssClass="navigationlabel" runat="server" meta:resourcekey="one2">随附单证</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR_1" id="divR2">
                </div>
            </div>
            <div style="float: left; width: 8px;">
                <div class="tabL_1" id="divL3">
                </div>
            </div>
            <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',3,3);"
                id="divM3">
                <asp:Label ID="one3" CssClass="navigationlabel" runat="server" meta:resourcekey="one3">明细信息</asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR_1" id="divR3">
                </div>
            </div>
        </div>
        <div id="div_content">
            <div id="con_one_1" style="display: block;">
                <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblDeclarationsID" CssClass="label" runat="server" Text="出区报关单号" meta:resourcekey="lblDeclarationsID"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblCustomsType" CssClass="label" runat="server" Text="报关类型" meta:resourcekey="lblCustomsType"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="状态" meta:resourcekey="lblStatus"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblDeclarationsDate" CssClass="label" runat="server" Text="申报日期" meta:resourcekey="lblDeclarationsDate"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtDeclarationsID" runat="server" CssClass="textbox" MaxLength="20"
                                meta:resourcekey="txtDeclarationsID"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:DropDownList ID="ddlCustomsType" runat="server" CssClass="mediumselectbox" meta:resourcekey="ddlCustomsType"
                                OnTextChanged="ddlCustomsType_TextChanged" AutoPostBack="True">
                            </asp:DropDownList>
                        </td>
                        <td width="180px">
                            <asp:DropDownList ID="ddlStatus" runat="server" CssClass="mediumselectbox" Enabled="False"
                                meta:resourcekey="ddlStatus">
                            </asp:DropDownList>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtDeclarationsDate" runat="server" CssClass="textbox" meta:resourcekey="txtDeclarationsDate"></asp:TextBox><img
                                src="../Images/calendar.gif" class="img" alt="请选择日期" onclick="setday(this,txtDeclarationsDate)" />
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblOwnerID" runat="server" CssClass="label" Text="货主代码" meta:resourcekey="lblOwnerID"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblCompanyDeclarationsID" runat="server" CssClass="label" Text="企业出口报关单号"
                                meta:resourcekey="lblCompanyDeclarationsID"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblVerificationFormID" runat="server" CssClass="label" Text="核销单号"
                                meta:resourcekey="lblVerificationFormID"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblCustomsBusinessType" runat="server" CssClass="label" Text="业务类型"
                                meta:resourcekey="lblCustomsBusinessType"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox" meta:resourcekey="txtOwnerID"></asp:TextBox><img
                                src="../Images/icon_find.gif" alt="select one item" class="img" runat="server"
                                id="imgOwnerID" onclick="selectOwner();" />
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtCompanyDeclarationsID" MaxLength="50" runat="server" CssClass="textbox"
                                meta:resourcekey="txtCompanyDeclarationsID"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtVerificationFormID" MaxLength="30" runat="server" CssClass="textbox"
                                Enabled="False" meta:resourcekey="txtVerificationFormID"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:DropDownList ID="ddlCustomsBusinessType" runat="server" CssClass="mediumselectbox"
                                Enabled="False" meta:resourcekey="ddlCustomsBusinessType">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblOwnerOrderID" runat="server" CssClass="label" Text="货主订单号" meta:resourcekey="lblOwnerOrderID"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblOrderID" runat="server" CssClass="label" Text="核放单号" meta:resourcekey="lblOrderID"></asp:Label><font
                                class="must_input">*</font>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblImportDate" runat="server" CssClass="label" Text="进境日期" meta:resourcekey="lblImportDate"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblRecordDate" runat="server" CssClass="label" Text="备案日期" meta:resourcekey="lblRecordDate"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtOwnerOrderID" runat="server" CssClass="textbox" meta:resourcekey="txtOwnerOrderID"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtOrderID" runat="server" CssClass="textbox" meta:resourcekey="txtOrderID"
                                AutoPostBack="True" OnTextChanged="OrderID_TextChanged"></asp:TextBox><img id="imgOrderID"
                                    src="../Images/icon_find.gif" alt="select one item" class="img" visible="false"
                                    onclick="selectOrder();" runat="server" />
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtImportDate" runat="server" CssClass="textbox" meta:resourcekey="txtImportDate"></asp:TextBox><img
                                src="../Images/calendar.gif" class="img" alt="请选择日期" onclick="setday(this,txtImportDate)" />
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtRecordDate" runat="server" CssClass="textbox" meta:resourcekey="txtRecordDate"></asp:TextBox><img
                                src="../Images/calendar.gif" class="img" alt="请选择日期" onclick="setday(this,txtRecordDate)" />
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblTotalGrossWGT" runat="server" CssClass="label" Text="总毛重" meta:resourcekey="lblTotalGrossWGT"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblTotalETWGT" runat="server" CssClass="label" Text="总净重" meta:resourcekey="lblTotalETWGT"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblTotalCube" runat="server" CssClass="label" Text="总体积" meta:resourcekey="lblTotalCube"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblExtendedPrice" runat="server" CssClass="label" Text="总金额" meta:resourcekey="lblExtendedPrice"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtTotalGrossWGT" runat="server" CssClass="textbox" meta:resourcekey="txtTotalGrossWGT"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtTotalETWGT" runat="server" CssClass="textbox" meta:resourcekey="txtTotalETWGT"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtTotalCube" runat="server" CssClass="textbox" meta:resourcekey="txtTotalCube"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtExtendedPrice" runat="server" CssClass="textbox" meta:resourcekey="txtExtendedPrice"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:Label ID="lblPallet" runat="server" CssClass="label" Text="托数" meta:resourcekey="lblPallet"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblCaseCNT" runat="server" CssClass="label" Text="箱数" meta:resourcekey="lblCaseCNT"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblCreatedDate" runat="server" CssClass="label" Text="创建日期" meta:resourcekey="lblCreatedDate"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblCreatedBy" runat="server" CssClass="label" Text="创建人" meta:resourcekey="lblCreatedBy"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="180px">
                            <asp:TextBox ID="txtPallet" runat="server" CssClass="textbox" meta:resourcekey="txtPallet"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtCaseCNT" runat="server" CssClass="textbox" meta:resourcekey="txtCaseCNT"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtCreatedDate" runat="server" CssClass="textbox" Enabled="False"
                                meta:resourcekey="txtCreatedDate"></asp:TextBox>
                        </td>
                        <td width="180px">
                            <asp:TextBox ID="txtCreatedBy" runat="server" CssClass="textbox" Enabled="False"
                                meta:resourcekey="txtCreatedBy"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <table width="720px" style="display: block; margin-left: 10px;">
                    <tr>
                        <td width="360px">
                            <asp:Label ID="lblReamrk" runat="server" CssClass="label" Text="备注" meta:resourcekey="lblReamrk"></asp:Label>
                        </td>
                        <td width="180px">
                            <asp:Label ID="lblWhDBName" runat="server" CssClass="label" Text="仓库名称" meta:resourcekey="lblWhDBName"></asp:Label>
                        </td>
                        <td width="180px">
                        </td>
                    </tr>
                    <tr>
                        <td width="363px">
                            <asp:TextBox ID="txtReamrk" runat="server" CssClass="textbox" Width="330px" meta:resourcekey="txtReamrk"></asp:TextBox>
                        </td>
                        <td width="200px">
                            <asp:TextBox ID="txtWhDBName" runat="server" CssClass="textbox" Width="150px" Enabled="False"
                                meta:resourcekey="txtWhDBName"></asp:TextBox>
                        </td>
                        <td width="180px">
                        </td>
                    </tr>
                    <tr style="height: 10px;">
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="con_one_2" style="display: none">
                <table width="700px" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td>
                                        <input type="file" name="uploadify" id="uploadify" />
                                        <a runat="server" onserverclick="SaveAttach_Click" id="SaveAttach"></a><a runat="server"
                                            onserverclick="DownloadAttach_Click" id="DownloadAttach"></a>
                                    </td>
                                    <td>
                                        <asp:Button ID="btnDeleteAttach" runat="server" CssClass="button" Enabled="False"
                                            Text="删除附件" OnClick="btnDeleteAttach_Click" OnClientClick="javascript:if(confirmMsg('C001')) return true; else return false;"
                                            meta:resourcekey="btnDeleteAttach" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="180" colspan="2">
                                        <div id="fileQueue">
                                        </div>
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr style="height: 10px;">
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div>
                                <asp:GridView ID="gvExportDeclarations" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                    AllowPaging="True" CssClass="gridview" Width="500px" OnInit="gvExportDeclarations_Init"
                                    DataKeyNames="AttachID,LineID,DisplayName,AttachType,Url" OnRowDataBound="gvExportDeclarations_RowDataBound"
                                    OnSorting="gvExportDeclarations_Sorting" meta:resourcekey="gvExportDeclarations">
                                    <FooterStyle CssClass="GridViewFooterStyle" />
                                    <RowStyle CssClass="GridViewRowStyle" />
                                    <HeaderStyle CssClass="GridViewHeaderStyle" />
                                    <PagerStyle CssClass="GridViewPageStyle" />
                                    <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                    <Columns>
                                        <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                            <ItemStyle CssClass="GridViewRowWidth_40" />
                                        </asp:BoundField>
                                        <asp:TemplateField meta:resourcekey="TemplateField">
                                            <HeaderTemplate>
                                                <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvExportDeclarations');"
                                                    meta:resourcekey="CheckBox1" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvExportDeclarations');"
                                                    meta:resourcekey="CheckBox2" />
                                            </FooterTemplate>
                                            <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                            <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="LineID" HeaderText="行号" FooterText="行号" SortExpression="LineID"
                                            meta:resourcekey="LineID">
                                            <ItemStyle CssClass="GridViewRowWidth_50" />
                                        </asp:BoundField>
                                        <asp:TemplateField FooterText="附件名称" HeaderText="附件名称" SortExpression="DisplayName"
                                            meta:resourcekey="DisplayName">
                                            <ItemTemplate>
                                                <asp:Label ID="lblDisplayName" runat="server" Text='<%# Eval("DisplayName") %>' CssClass="linklabel"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="GridViewRowWidth_200" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="AttachType" HeaderText="单证类别" FooterText="单证类别" SortExpression="AttachType"
                                            meta:resourcekey="AttachType">
                                            <ItemStyle CssClass="GridViewRowWidth_100" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Descr" HeaderText="备注" FooterText="备注" SortExpression="Descr"
                                            meta:resourcekey="Descr">
                                            <ItemStyle CssClass="GridViewRowWidth_100" />
                                        </asp:BoundField>
                                    </Columns>
                                </asp:GridView>
                            </div>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr style="height: 30px;">
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="con_one_3" style="display: none">
                <table width="1080px" style="display: block; margin-left: 10px; margin-top: 10px;">
                    <tr style="height: 10px;">
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div>
                                <div>
                                    <asp:GridView ID="gvExportDeclarationsDetail" runat="server" AllowSorting="True"
                                        AutoGenerateColumns="False" AllowPaging="True" CssClass="gridview" Width="1850px"
                                        OnInit="gvExportDeclarationsDetail_Init" OnRowDataBound="gvExportDeclarationsDetail_RowDataBound"
                                        OnSorting="gvExportDeclarationsDetail_Sorting" meta:resourcekey="gvOrderDetail">
                                        <FooterStyle CssClass="GridViewFooterStyle" />
                                        <RowStyle CssClass="GridViewRowStyle" />
                                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                                        <PagerStyle CssClass="GridViewPageStyle" />
                                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                        <Columns>
                                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                                <ItemStyle CssClass="GridViewRowWidth_40" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="SkuID" HeaderText="货品代码" FooterText="货品代码" SortExpression="SkuID"
                                                meta:resourcekey="SkuID">
                                                <ItemStyle CssClass="GridViewRowWidth_100" />
                                            </asp:BoundField>
                                            <asp:TemplateField FooterText="货品描述" HeaderText="货品描述" SortExpression="SkuDescr"
                                                meta:resourcekey="SkuDescr">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSkuDescr" runat="server" Text='<%# Eval("SkuDescr") %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="GridViewRowWidth_200" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="ItemNoID" HeaderText="项号" FooterText="项号" SortExpression="ItemNoID"
                                                meta:resourcekey="ItemNoID">
                                                <ItemStyle CssClass="GridViewRowWidth_100" />
                                            </asp:BoundField>
                                            <asp:TemplateField FooterText="项号描述" HeaderText="项号描述" SortExpression="ItemNoDescr"
                                                meta:resourcekey="ItemNoDescr">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblItemNoDescr" runat="server" Text='<%# Eval("ItemNoDescr") %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="GridViewRowWidth_200" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="箱数" HeaderText="箱数" SortExpression="Udf1" meta:resourcekey="Udf1">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtUdf1" CssClass="textbox" runat="server" Width="80px" Text='<%# Eval("Udf1").ToString() %>'></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="托数" HeaderText="托数" SortExpression="Udf2" meta:resourcekey="Udf2">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtUdf2" CssClass="textbox" runat="server" Width="80px" Text='<%# Eval("Udf2").ToString() %>'></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="发货数量" HeaderText="发货数量" SortExpression="ShippedQty"
                                                meta:resourcekey="ShippedQty">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblShippedQty" runat="server" Text='<%# GetPreferenceDigit(Eval("ShippedQty").ToString()) %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="未申报数量" HeaderText="未申报数量" SortExpression="DifferencesQty"
                                                meta:resourcekey="DifferencesQty">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblDifferencesQty" runat="server" Text='<%# GetPreferenceDigit(Eval("DifferencesQty").ToString()) %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="申报数量" FooterText="申报数量" meta:resourcekey="DeclarationsQty">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtQty" CssClass="textbox" runat="server" onblur="VerifyTheQty(this);"
                                                        ToolTip='<%# Eval("DifferencesQty").ToString() %>' Width="80px" Text='<%# GetPreferenceDigit(Eval("DifferencesQty").ToString()) %>'></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="已申报数量" HeaderText="已申报数量" SortExpression="Qty" meta:resourcekey="Qty">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblQty" runat="server" Text='<%# GetPreferenceDigit(Eval("Qty").ToString()) %>'></asp:Label>
                                                </ItemTemplate>
                                                <ItemStyle CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="UomID" HeaderText="单位" FooterText="单位" SortExpression="UomID"
                                                meta:resourcekey="UomID">
                                                <ItemStyle CssClass="GridViewRowWidth_100" />
                                            </asp:BoundField>
                                            <asp:TemplateField FooterText="单价" HeaderText="单价" SortExpression="UnitPrice" meta:resourcekey="UnitPrice">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtUnitPrice" CssClass="textbox" runat="server" Width="80px" Text='<%# GetPreferenceDigit(Eval("UnitPrice").ToString()) %>'
                                                        AutoPostBack="True" OnTextChanged="txtUnitPrice_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="金额" HeaderText="金额" SortExpression="ExtendedPrice"
                                                meta:resourcekey="ExtendedPrice">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtExtendedPrice" CssClass="textbox" runat="server" Width="80px"
                                                        Text='<%# GetPreferenceDigit(Eval("ExtendedPrice").ToString()) %>' AutoPostBack="True"
                                                        OnTextChanged="txtExtendedPrice_TextChanged"></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="毛重" HeaderText="毛重" SortExpression="GrossWgt" meta:resourcekey="GrossWgt">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtGrossWgt" CssClass="textbox" runat="server" Width="80px" Text='<%# GetPreferenceDigit(Eval("GrossWgt").ToString()) %>'></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="净重" HeaderText="净重" SortExpression="NetWgt" meta:resourcekey="NetWgt">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtNetWgt" CssClass="textbox" runat="server" Width="80px" Text='<%# GetPreferenceDigit(Eval("NetWgt").ToString()) %>'></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:TemplateField FooterText="体积" HeaderText="体积" SortExpression="Cube" meta:resourcekey="Cube">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtCube" CssClass="textbox" runat="server" Width="80px" Text='<%# GetPreferenceDigit(Eval("Cube").ToString()) %>'></asp:TextBox>
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_100" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="Remark" HeaderText="备注" FooterText="备注" SortExpression="Remark"
                                                meta:resourcekey="Remark">
                                                <ItemStyle CssClass="GridViewRowWidth_200" />
                                            </asp:BoundField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr style="height: 30px;">
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="actionDiv" style="background-color: #FFFFFF; position: absolute; display: none;
            border: none 0 black">
            <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu">
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnAudit" runat="server" visible="false">
                        <asp:LinkButton ID="lnkbtnAudit" runat="server" Text="审核" OnClientClick="blockScreen();"
                            OnClick="lnkbtnAudit_Click" meta:resourcekey="lnkbtnAudit"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnRevertAudit" runat="server" visible="false">
                        <asp:LinkButton ID="lnkbtnRevertAudit" runat="server" Text="反审核" OnClientClick="blockScreen();"
                            OnClick="lnkbtnRevertAudit_Click" meta:resourcekey="lnkbtnRevertAudit"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnWrittenOff" runat="server" visible="false">
                        <asp:LinkButton ID="lnkbtnWrittenOff" runat="server" Text="核销确认" OnClientClick="blockScreen();"
                            OnClick="lnkbtnWrittenOff_Click" meta:resourcekey="lnkbtnWrittenOff"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnRevertWrittenOff" runat="server" visible="false">
                        <asp:LinkButton ID="lnkbtnRevertWrittenOff" runat="server" Text="核销反确认" OnClientClick="blockScreen();"
                            OnClick="lnkbtnRevertWrittenOff_Click" meta:resourcekey="lnkbtnRevertWrittenOff"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnUpdateVolumeData" runat="server" visible="false">
                        <asp:LinkButton ID="lnkbtnUpdateVolumeData" runat="server" Text="修改明细数据" OnClientClick="blockScreen();"
                            OnClick="lnkbtnUpdateVolumeData_Click" meta:resourcekey="lnkbtnUpdateVolumeData"></asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <input id="hdnDeclarationsID" runat="server" type="hidden" />
    <input type="hidden" id="hdnFrom" runat="server" />
    <input id="hdnFlag" runat="server" type="hidden" value="0" />
    <input type="hidden" id="hdnActionID" runat="server" />
    <input type="hidden" id="hdnDataFormat" runat="server" />
    <input type="hidden" id="hdncalendarFlag" runat="server" />
    <input type="hidden" id="hdnLineID" runat="server" />
    <input type="hidden" id="hdnAttachLineID" runat="server" value="0" />
    <input type="hidden" id="hdnAttachID" runat="server" />
    <input type="hidden" id="hdnContractID" runat="server" />
    <input type="hidden" id="hdnImgpath" runat="server" />
    <input type="hidden" id="hdnImgName" runat="server" />
    <input type="hidden" id="hdnResponse" runat="server" />
    <input type="hidden" id="hdnfileName" runat="server" />
    <input type="hidden" id="hdnfullPath" runat="server" />
    <input type="hidden" id="hiddenReportFlag" />
    <input type="hidden" id="hiddenFlag" />
    </form>
</body>
</html>

<script language="javascript" type="text/javascript" event="onclick" for="document">
     	hiddenCalendarDiv();
		hiddenDiv();
</script>

